<?php
/**
* @author: Nguyen Thanh Tung
* @date: Monday, January 27, 2014
*/
// check permission add new

if( !isset($AppUI->id)||
!isset($_SESSION['title'])||
isset($_SESSION['title'])&& ($_SESSION['title']&1<<1)==0)
{
	/*|| 
	(isset($AppUI->id) && !in_array($AppUI->type, array(ROLE_ROOT, ROLE_ADMINISTRATOR)))*/ 
	redirect(HOST_BACKEND);
}

$this->load->model('league_model','league');
$league = $this->league->getAll();
$this->smarty->assign('league',$league);
//===============================================================
$this->load->library('common');
$seasons= $this->common->getSeason();
$this->smarty->assign('seasons',$seasons);
$this->smarty->assign('personalId',(int)$this->uri->segment(3));
$this->smarty->display('title/add.tpl');